#include "DeviceInput.h"

DeviceInput::DeviceInput(){}
DeviceInput::~DeviceInput(){}

DeviceInput* DeviceInput::getInst()
{
	static DeviceInput d;
	return &d;
}

void DeviceInput::InputInit()
{
	_keyboad.keyboadInit();
	_mouse.MouseInit();
}

void DeviceInput::Update()
{
	_keyboad.keyboadUpdate();
	_mouse.MouseUpdate();
}

void DeviceInput::Release()
{
	_keyboad.keyboadFinish();
	_mouse.MouseFinish();
}

void DeviceInput::ActiveInput()
{
	_keyboad.keyboadActiveInput();
	_mouse.MouseActiveInput();
}

bool DeviceInput::isKeyState(KeyCode::Code code)
{
	return _keyboad.isKeyState(code);
}

bool DeviceInput::isKeyTrigger(KeyCode::Code code)
{
	return _keyboad.isKeyTrigger(code);
}

DeviceMouseInput* DeviceInput::GetMouse()
{
	return &_mouse;
}